pcolor is a built-in patch variable that holds the color of the patch. In other words, this primitive changes the background color. Because pcolor is a variable, you need to use the set command to change it. You can change the patch color in the command center on the Interface tab or using the Inspector. Be sure to change the drop-down to “patches” before typing in the command! pcolor can be represented by simply stating the color (e.g., brown, yellow, red; note that there are no quotation marks around the color names) or NetLogo color (a single number). For example, you can write ask patches [set pcolor pink] or ask patches [ set pcolor 15]. Turtles can directly access and change the color of the patch they are on using this primitive. For example: ask turtles [ set pcolor yellow]. To change the color of the turtles, see color .
Once you mastered the pcolor primitive, don't stop there. Check out the resources below to improve your NetLogo skills.